# import os
# path = "E:/日常资料/工作需求文档/XU"
#
# def traversal_file():
#     count = 0
#     for root, dirs, files in os.walk(path):
#         # print('root %s dirs %s' %(root,dirs))
#         for each in files:
#             print(each)
#             # if each
#             count += 1
#     print(count)
#
# traversal_file()

import os

g = os.walk("F:\python\\2018-7")

for path, d, filelist in g:
    print(d)
    for filename in filelist:
        print(os.path.join(path, filename))
